{% extends "personal_center/base.html" %}
<!--固定资产付款创建页-->
{% block page_link %}
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
    <link rel="stylesheet" href="../../static/personnel/TimeSelector/skin/jedate.css">
{% endblock %}


{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }
        tr {
            height: 37px;
        }
        th {
            text-align: center;
        }
        tbody td {
            overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
        }
        td:first-child, th:first-child {
            position: sticky;left: 0;z-index: 1;
        }
        thead tr th {
            position: sticky;top: 0;background-color: #E8E8E8;
        }
        th:first-child {
            z-index: 2;
        }
        #tb_1 tr:hover {
            background: #cfcfcf;
        }
        .file {
            position: relative;display: inline-block;background: #D0EEFF;border: 1px solid #99D3F5;border-radius: 4px;padding: 4px 12px;overflow: hidden;color: #1E88C7;text-decoration: none;text-indent: 0;line-height: 20px;
        }
        .file input {
            position: absolute;font-size: 100px;right: 0;top: 0;opacity: 0;
        }
        .file:hover {
            background: #AADFFD;border-color: #78C3F3;color: #004974;text-decoration: none;
        }
        .top_tag {
            border-bottom: #01AAED solid 2px;color: #01AAED;
        }
        .tab_top {
            width: 100px;height: 40px;line-height: 40px;text-align: center;display: inline-block;cursor: pointer;
        }
        .button_for_control {
            width: 90px;height: 30px;border: 1px solid #99D3F5;background: #D0EEFF;border-radius: 4px;letter-spacing: 0;line-height: 30px;color: #089bab;margin: 5px 0;
        }

        #page_one button:hover {
            color: red;
        }
        .jeinput_1 {
            display: inline-block;width: 100%;height: 36px;line-height: 34px;border: none;background-color: #fff;border-radius: 3px;
        }
        .a_tag_cla{
            display: block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;height: 30px;line-height: 30px;padding-left: 1%;
        }
        .shade1 {
            position: fixed;top: 45px;left: 14%;right: 0;bottom: 0;background-color: rgba(36, 36, 36, 0.5);display: none;z-index: 10000;
        }
        .stop_file {
            position: relative;display: inline-block;background: #D0EEFF;border: 1px solid #99D3F5;border-radius: 4px;padding: 4px 12px;overflow: hidden;color: #1E88C7;text-decoration: none;text-indent: 0;line-height: 20px;
        }
        .stop_file input {
            position: absolute;font-size: 100px;right: 0;top: 0;opacity: 0;
        }
        .stop_file:hover {
            background: #AADFFD;border-color: #78C3F3;color: #004974;text-decoration: none;
        }
    </style>
{% endblock %}


{% block right_content %}
    <div class="headline">
        <div id="DW_tag" class="tab_top top_tag" onclick="change_mind('DW')">
            申请详情
        </div>
        <div id="LH_tag" class="tab_top" onclick="change_mind('LH')">
            附件
        </div>
        <div id="lct_tag" class="tab_top" onclick="change_mind('lct')">
            流程图
        </div>
        <div id="" style="width: 100px;float: right;text-align: center;margin-right: 1%;height: 40px;">
            <button id="" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
                    style="width: 100px;height: 30px;line-height: 27px;border: #1E90FF solid 1px;background: #1E90FF;color: white;margin-top: 5px;border-radius: 3px;">
                操作
            </button>
        </div>
        <div style="width: 110px;float: right;text-align: center;margin-right: 6px;height: 40px;">
            <button style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 100px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;">
                <a href="javascript:history.go(-1)" style="color: white;">返回</a></button>
        </div>
        <!-- 操作按钮隐藏块 -->
        <div id="page_one" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
             style="z-index: 1000; position: absolute; width: 100px; height: auto;right: 0.9%; top: 80px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;padding: 5px;display: none;">
            <button onclick="print_topics()" class="button_for_control">
                打印
            </button>
            {% if is_audit == 'true' %}
                <button id="approve" onclick="online_tag()" class="button_for_control">
                    审批
                </button>
            {% endif %}

            {% if is_stop == 'true' %}
                <button id="is_stop" onclick="operate_button()" class="button_for_control">
                    终止
                </button>
            {% endif %}

            {% if is_edit == 'true' %}
                <button id="add_station" type="button" class="button_for_control" onclick="ExportCar()">
                    提交
                </button>
            {% endif %}
        </div>
    </div>
    <hr>

    <div id="appave-model" class="shade1">
        <div id="examine-model" style="width: 700px;background: white;left: 50%;top: 50%;position: absolute;transform: translate(-50%, -50%);">
            <div id="appave-title" style="width: 100%;height: 40px;border-bottom: #cfcfcf solid 1px;font-size: 14px;cursor: move;">
                <div style="width: 40%;height: 40px;line-height: 40px;text-align: left;padding-left: 1%;letter-spacing: 2px;float: left;">
                    审批
                </div>
                <div style="width: 59%;height: 40px;letter-spacing: 2px;float: left;">
                    <div onclick="close_models()" style="width: 40px;height: 40px;text-align: center;line-height: 40px;cursor: pointer;float: right;">
                        <i class="iconfont icon-quchu"></i>
                    </div>
                </div>
            </div>

            <div style="width: 100%;font-size: 14px;background: #E8E8E8;padding-top: 1%;">
                <div style="width: 98%;height: 150px;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;padding-right: 1%;">
                    <div style="width: 100%;height: 35px;line-height: 35px;border-bottom: #E8E8E8 solid 1px;padding-left: 1%;">
                        基本信息
                    </div>
                    <div style="width: 100%;height: 125px;padding-left: 1%;">
                        <div style="width: 100%;height: 50px;">
                            <div style="width: 49%;height: 50px;float: left;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">申请人：</span>{{ obj.user.real_name }}
                            </div>
                            <div style="width: 49%;height: 50px;float: right;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">所属科室：</span>{{ obj.company.name }}
                            </div>
                        </div>

                        <div style="width: 100%;height: 50px;">
                            <div style="width: 49%;height: 50px;float: left;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">离职原因：</span>{{ obj.dimission_note }}
                            </div>
                            <div style="width: 49%;height: 50px;float: right;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">拟离职时间：</span>{{ obj.dimission_time|date:'Y-m-d' }}
                            </div>
                        </div>
                    </div>
                </div>

                <div style="width: 98%;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;margin-top: 1%;padding-right: 1%;padding-bottom: 20px;">
                    <div style="width: 100%;height: 35px;line-height: 35px;border-bottom: #E8E8E8 solid 1px;padding-left: 1%;">
                        意见
                    </div>
                    <div style="width: 100%;">
                        <textarea id="opinion_detail" placeholder="请输入审批意见" style="width: 96%;height: 100px;margin-left: 2%;margin-top: 1%;border: #cfcfcf solid 1px;outline: none;font-size: 14px;" ></textarea>
                    </div>
                </div>

                <div style="width: 100%;height: 40px;background: white;margin-top: 1%;text-align: right;padding-right: 2%;">
                    <button onclick="summit_data('audit')" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;">同意</button>
                    <button onclick="summit_data('draft')" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;margin-left: 15px;">退回修改</button>
                </div>
            </div>
        </div>
    </div>

    <div id="DW" style="width: 100%;height: 95%;background: white;overflow: auto;">
        <div id="menu_from"
             style="width: 100%;height: auto;color: #2C3E50;display: inline-block;vertical-align: top;background: white;">
            <div style="width: 95%;height: auto;display: inline-block;vertical-align: center;margin-left: 2.5%;">
                <div style="width: 100%">
                    <table style="width: 100%;margin-top: 1.5%;">
                        <tr style="width: 100%;">
                            <td colspan="4" style="height: 40px;text-align: center;border: #cfcfcf solid 0.5px;"><h3>离&nbsp;职&nbsp;申&nbsp;请</h3></td>
                        </tr>
                        <tr>
                            <td colspan="4" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;color: #1E90FF;">基本信息</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                申&nbsp;&nbsp;请&nbsp;人
                            </td>
                            <td id="user"
                                style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                {{ obj.user.real_name }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号
                            </td>
                            <td id="job_number"
                                style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ obj.job_number }}
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                所属科室
                            </td>
                            <td id="company"
                                style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ obj.company.name }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称
                            </td>
                            <td id="rank"
                                style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ obj.rank }}
                            </td>

                        </tr>

                        <tr>

                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历
                            </td>
                            <td id="education"
                                style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;padding-left: 1%">
                                {{ obj.education }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                联系方式
                            </td>
                            <td id="tel_num"
                                style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ obj.tel_num }}
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                入职时间
                            </td>
                            <td style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;padding-left: 1%">
                                {% if is_edit == 'true' %}
                                    <input type="text" class="jeinput_1" id="test12" placeholder="选择日期" value="{{ obj.hiredate|date:'Y-m-d' }}" autocomplete="off">
                                {% else %}
                                    {{ obj.hiredate|date:'Y-m-d' }}
                                {% endif %}

                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                拟离职时间
                            </td>
                            <td style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;padding-left: 1%;">
                                {% if is_edit == 'true' %}
                                    <input type="text" class="jeinput_1" id="test13" placeholder="选择日期" value="{{ obj.dimission_time|date:'Y-m-d' }}" autocomplete="off">
                                {% else %}
                                    {{ obj.dimission_time|date:'Y-m-d' }}
                                {% endif %}
                            </td>
                        </tr>

                        <tr style="width: 100%;">
                            {% if is_edit == 'true' %}
                                <td style="width: 10%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                    离职原因
                                </td>
                                <td style="width: 35%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: left;padding-left: 1%;">
                                    <input type="text" id="dimission_note" style="width: 100%;height: 100%;border: none" value="{{ obj.dimission_note }}"></td>
                                <td style="width: 10%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;letter-spacing: 6px;">
                                    人员类别&nbsp;
                                </td>
                                <td style="width: 35%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: left;padding-left: 1%;">
                                    <input type="radio" name="people_type" value="1" {% if obj.people_type == '1' %}checked{% endif %}> 行管
                                    <input type="radio" name="people_type" value="2" {% if obj.people_type == '2' %}checked{% endif %} style="margin-left: 20px;"> 医技/临床
                                    <input type="radio" name="people_type" value="3" {% if obj.people_type == '3' %}checked{% endif %} style="margin-left: 20px;"> 护理
                                </td>
                            {% else %}
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">离职原因</td>
                                <td colspan="3" style="width: 85%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: left;padding-left: 1%;">{{ obj.dimission_note }}</td>
                            {% endif %}
                        </tr>
                        <tr>
                            <td colspan="4"
                                style="width: 90%;height: 40px;margin-left: 5%;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;border-top: none;padding-right: 1%;">
                                审批详情
                            </td>
                        </tr>
                        {% if 'zero' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2.2px;">
                                    人&nbsp;事&nbsp;科&nbsp;初&nbsp;审
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'zero' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'one' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2.2px;">
                                    科&nbsp;室&nbsp;负&nbsp;责&nbsp;人
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'one' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'two' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4px;">
                                    业务主管部门
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'two' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'three' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4px;">
                                    业务分管院长
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'three' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'four' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4px;">
                                    分管人事院长
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'four' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'five' in audit_dic %}
                            {% if '党委办公室' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                        党&nbsp;委&nbsp;办&nbsp;公&nbsp;室
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '党委办公室' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '监察室' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        监&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;察&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;室
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '监察室' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '医院办公室' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                        医&nbsp;院&nbsp;办&nbsp;公&nbsp;室
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '医院办公室' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '工会办公室' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2.1px;">
                                        工&nbsp;会&nbsp;办&nbsp;公&nbsp;室
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '工会办公室' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '医务科' in five_node_list or '护理部' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 3.1px;">
                                        医&nbsp;务&nbsp;/&nbsp;护&nbsp;理
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        进修约定赔偿、医疗纠纷赔偿、社会任职
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '医务科' or item.node_name == '护理部' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '科教科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        科&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;教&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '科教科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '宣传科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        宣&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;传&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        更新宣传信息
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '宣传科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '总务科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;务&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '总务科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '膳食委员会' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                        膳&nbsp;食&nbsp;委&nbsp;员&nbsp;会
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        上交饭卡
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '膳食委员会' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '设备科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        设&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '设备科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '网络信息科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                        网&nbsp;络&nbsp;信&nbsp;息&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        人员信息移库
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '网络信息科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '病案统计科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                        病&nbsp;案&nbsp;统&nbsp;计&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        病历归档、借阅情况
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '病案统计科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '图书室' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        图&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;书&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;室
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        图书借阅
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '图书室' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}

                            {% if '人事科' in five_node_list %}
                                <tr style="width: 100%;">
                                    <td style="width: 15%;max-height: 150px;;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                        人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;事&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;科
                                    </td>
                                    <td style="width: 35%;max-height: 150px;border: #cccccc solid 1px;padding-left: 1%;border-top: none;">
                                        含各种保险
                                    </td>
                                    <td colspan="2" style="width: 50%;max-height: 150px;;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for k,v in audit_dic.items %}
                                            {% if k == 'five' %}
                                                {% for item in v %}
                                                    {% if item.state != 'unaudit' and item.node_name == '人事科' %}
                                                        <div style="width: 100%;line-height: 20px;position: relative;">
                                                            <span>{{ item.state_display }}</span>
                                                            <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                        </div>
                                                        <div>
                                                            {% if item.signature_picture %}
                                                                <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                            {% else %}
                                                                {{ item.audit_user }}
                                                            {% endif %}
                                                        </div>
                                                        <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                    {% endif %}
                                                {% endfor %}
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endif %}

                        {% if 'six' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    经济管理办公室
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'six' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'seven' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                    财&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;务&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;科
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'seven' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'stop' in audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;max-height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                                    中&nbsp;&nbsp;&nbsp;止&nbsp;&nbsp;&nbsp;理&nbsp;&nbsp;&nbsp;由
                                </td>
                                <td colspan="3" style="width: 85%;max-height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in audit_dic.items %}
                                        {% if k == 'stop' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}
                    </table>
                </div>
                {% if is_edit == 'true' %}
                    <div style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;border-top: none;border-bottom: none;padding-right: 1%;">
                        上传附件
                        <a href="javascript:;" class="file"
                           style="vertical-align: top;margin-top: 5px;float: right;">
                            上传文件
                            <input type="file" name="party_main_body" id="party_main_body"
                                   onchange="upload_accessory('file1', 'party_main', 'party_main_body')">
                        </a>
                    </div>
                    <table style="width: 100%;">
                        <thead>
                        <tr>
                            <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">序号</td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                文件名称
                            </td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                文件大小
                            </td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                上传时间
                            </td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                上传人员
                            </td>
                            <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                操作
                            </td>
                        </tr>
                        </thead>
                        <tbody style="overflow: auto;" id="party_main">
                        {% for record in file_list %}
                            <tr>
                                <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">{{ forloop.counter }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_name }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_size }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.upload_time }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.uploader }}</td>
                                <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    <a target='_blank' href="{{ record.file_path }}">查看</a> | <a style="color: red;"
                                                                                                 href='#'
                                                                                                 onclick='RemoveTr(this, "party_main", {{ record.id }})'>删除</a>
                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                {% endif %}
            </div>
        </div>
    </div>

    <div id="LH" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="display: inline-block;width: 20%;vertical-align: top;height: 99%">
            <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                附件
            </div>
            <div style="width: 100%;">
                {% for item in file_list %}
                    {% if item.file_type == '0' %}
                        <div><a href="#" class="a_tag_cla" title="{{ item.file_name }}" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                    {% endif %}
                {% endfor %}
            </div>
            {% if 'stop' in audit_dic %}
                <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                    中止附件
                </div>
                <div style="width: 100%;">
                    {% for item in file_list %}
                        {% if item.file_type == '1' %}
                            <div><a href="#" class="a_tag_cla" title="{{ item.file_name }}" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                        {% endif %}
                    {% endfor %}
                </div>
            {% endif %}
        </div>
        <div style="display: inline-block;width: 78%;vertical-align: top;height: 99%;text-align: center;" id="fujian">
            {% if 'jpg' in file_path or 'JPG' in file_path or 'JPEG' in file_path or 'jpeg' in file_path or 'PNG' in file_path or 'png' in file_path %}
                <img src="{{ file_path }}" alt="" style="width: 800px;height: 100%;">
            {% else %}
                <embed id="embed_file" src="{{ file_path }}" type="application/pdf" style="width: 100%;height: 100%;">
            {% endif %}
        </div>
    </div>

    <div id="lct" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="width: 100%;height: 40%;text-align: center;margin: 20% auto;">
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    ({{ obj.user.real_name }})<br>
                    发起人
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    start
                </div>
            </div>

            {% if 'zero' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'zero' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                人事科初审
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'one' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'one' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                科室负责人
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'two' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'two' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                业务主管部门
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'three' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'three' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                业务分管院长
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'four' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'four' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                分管人事院长
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'five' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'five' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                调离通知审核
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'six' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'six' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                经济管理办公室
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'seven' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'seven' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                财务科
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            <div style="display: inline-block;border: #0d8ddb solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    <span style="visibility: hidden;">({{ obj.user.real_name }})</span><br>
                    结束
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    ending
                </div>
            </div>
        </div>
    </div>

    <div id="stop_popup" class="shade1">
        <div id="stop_module" style="width: 700px;background: white;left: 50%;top: 50%;position: absolute;transform: translate(-50%, -50%);">
            <div id="stop_title" style="width: 100%;height: 40px;border-bottom: #cfcfcf solid 1px;font-size: 14px;cursor: move;">
                <div style="width: 40%;height: 40px;line-height: 40px;text-align: left;padding-left: 1%;letter-spacing: 2px;float: left;">
                    中止
                </div>
                <div style="width: 59%;height: 40px;letter-spacing: 2px;float: left;">
                    <div onclick="close_stop_module()" style="width: 40px;height: 40px;text-align: center;line-height: 40px;cursor: pointer;float: right;">
                        <i class="iconfont icon-quchu"></i>
                    </div>
                </div>
            </div>
            <div style="width: 100%;">
                <div style="width: 98%;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;margin-top: 1%;padding-right: 1%;padding-bottom: 20px;">
                    <div style="width: 100%;">
                        <textarea id="discontinue_reason" placeholder="请输入中止理由" style="width: 96%;height: 100px;margin-left: 2%;margin-top: 1%;border: #cfcfcf solid 1px;outline: none;font-size: 14px;" ></textarea>
                    </div>
                </div>
                <div style="width: 98%;margin-left: 1%;height: 150px;padding-left: 3%;">
                    <div style="width: 150px;height: 150px;display: inline-block;vertical-align: top;">
                        <a href="javascript:;" class="stop_file">
                            <img src="../../static/personal_center/img/加号_o.png" alt="" onclick="onclick_upload_file()" style="width: 100px;height: 100px;vertical-align: baseline;">
                            <input type="file" name="regular_main_body" id="regular_main_body" onchange="upload_accessory1('file1', 'regular_main', 'regular_main_body')">
                        </a>
                    </div>
                    <div id="upload_file_list" style="width: 76%;height: 100%;display: inline-block;vertical-align: top;">

                    </div>
                </div>
                <div style="width: 100%;height: 40px;text-align: right;padding-right: 1%;">
                    <button onclick="discontinue_flow({{ obj.id }})" style="width: 100px;height: 35px;border: #2db7f5 solid 1px;background: #2db7f5;border-radius: 3px;color: white;">提交</button>
                    <button onclick="close_stop_module()" style="width: 100px;height: 35px;border: #cfcfcf solid 1px;background: #cfcfcf;border-radius: 3px;margin-left: 10px;">取消</button>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

{% block script %}
    <script type="text/javascript" src="../../static/personnel/TimeSelector/src/jedate.js"></script>
    <script language="javascript" src="../../static/personal_center/js/jquery.jqprint-0.3.js"></script>
    <script>
        const uuid = "{{ obj.fj_number | safe }}"
        const is_edit = '{{ is_edit }}'             // 判断是否可以修改参数
        const file_entry = [];
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("personage").className = "add_class";
            document.getElementById("sponsor").className = "add-nav-active";
        };

        if(is_edit === 'true') {
            //自定义格式选择
            jeDate("#test12", {
                format: "YYYY-MM-DD"
            });
            jeDate("#test13", {
                format: "YYYY-MM-DD"
            });

            //一次绑定多个选择
            var jel = document.querySelectorAll(".moredate");
            for (var j = 0; j < jel.length; j++) {
                var mat = jel[j].getAttribute("placeholder");
                jeDate(jel[j], {
                    format: mat
                });
            }

            //一次绑定多个选择DIV类型
            var divel = document.querySelectorAll(".divmore");
            for (var j = 0; j < divel.length; j++) {
                var divmat = divel[j].getAttribute("placeholder");
                jeDate(divel[j], {
                    format: divmat
                });
            }
        }

        function change_mind(ele_id) {
            if (ele_id === "DW") {
                document.getElementById("DW").style.display = "inline-block";
                document.getElementById("DW_tag").className = "tab_top top_tag";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            } else if (ele_id === "LH") {
                document.getElementById("LH").style.display = "inline-block";
                document.getElementById("LH_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            }else {
                document.getElementById("lct").style.display = "inline-block";
                document.getElementById("lct_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
            }
        }

        function chage_yulan(this_, file_path) {
            var fujian = document.getElementById("fujian");
            var file_index = file_path.lastIndexOf(".")
            var ext = file_path.substring(file_index+1)
            var arr=['jpg', 'JPG', "JPEG", "jpeg", "PNG", "png"];
            var ext_index=arr.indexOf(ext);
            if (ext_index === -1){
                fujian.innerHTML = '<embed id="embed_file" src="'+file_path+'" type="" style="width: 100%;height: 100%;">'
            }else {
                fujian.innerHTML = '<img src="' + file_path + '" alt="application/pdf" style="width: 800px;height: 100%;">'
            }

            var a_tag_list = document.getElementsByClassName("a_tag_cla");
            for (var i = 0;i<a_tag_list.length; i++){
                a_tag_list[i].style.background='';
            }
            this_.style.background='#cfcfcf';
        }

        // 上传附件
        function upload_accessory(file_type, tbody_id, accessory_type) {
            document.getElementById("loading").style.display = "inline-block";
            var form = new FormData();
            var files = document.getElementById(accessory_type).files[0];
            form.append(file_type, files);
            form.append('number', uuid)
            form.append('source', 'qjlc')     // 请假流程
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/topics_attachments_upload", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        creat_table(JsonDate, tbody_id)
                    }
                }
            };
        }

        // 创建附件列表
        function creat_table(JsonData, tbody_id) {
            var t_table = document.getElementById(tbody_id);
            var local_host = window.location.host;
            if (Array.isArray(JsonData["pdf_path"])) {
                for (var i = 0; i < JsonData["pdf_path"].length; i++) {
                    var tr = document.createElement("tr");var td1 = document.createElement("td");var td2 = document.createElement("td");var td3 = document.createElement("td");var td4 = document.createElement("td");var td5 = document.createElement("td");var td6 = document.createElement("td");
                    td1.innerHTML = t_table.children.length + 1;td1.style.textAlign = "center";td1.style.border = "#cccccc solid 1px";td1.style.borderTop = "none";
                    td2.innerHTML = JsonData["file_name"];td2.style.paddingLeft = "1%";td2.style.border = "#cccccc solid 1px";td2.style.borderLeft = "none";td2.style.borderTop = "none";
                    td3.innerHTML = JsonData["file_size"];td3.style.textAlign = "center";td3.style.border = "#cccccc solid 1px";td3.style.borderLeft = "none";td3.style.borderTop = "none";
                    td4.innerHTML = JsonData["upload_time"];td4.style.textAlign = "center";td4.style.border = "#cccccc solid 1px";td4.style.borderLeft = "none";td4.style.borderTop = "none";
                    td5.innerHTML = JsonData["uploader"];td5.style.textAlign = "center";td5.style.border = "#cccccc solid 1px";td5.style.borderLeft = "none";td5.style.borderTop = "none";
                    td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"][i]["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["pdf_path"][i]["id"] + "\")'>删除</a>";
                    td6.style.textAlign = "center";td6.style.border = "#cccccc solid 1px";td6.style.borderLeft = "none";td6.style.borderTop = "none";
                    tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);tr.appendChild(td6);
                    t_table.appendChild(tr);
                }
                if (JsonData["pdf_path"].length > 1) {
                    document.getElementById("del_adjunct").style.display = 'block';
                }
            } else {
                tr = document.createElement("tr");td1 = document.createElement("td");td2 = document.createElement("td");td3 = document.createElement("td");td4 = document.createElement("td");td5 = document.createElement("td");td6 = document.createElement("td");
                td1.innerHTML = t_table.children.length + 1;td1.style.textAlign = "center";td1.style.border = "#cccccc solid 1px";td1.style.borderTop = "none";
                td2.innerHTML = JsonData["file_name"];td2.style.paddingLeft = "1%";td2.style.border = "#cccccc solid 1px";td2.style.borderLeft = "none";td2.style.borderTop = "none";
                td3.innerHTML = JsonData["file_size"];td3.style.textAlign = "center";td3.style.border = "#cccccc solid 1px";td3.style.borderLeft = "none";td3.style.borderTop = "none";
                td4.innerHTML = JsonData["upload_time"];td4.style.textAlign = "center";td4.style.border = "#cccccc solid 1px";td4.style.borderLeft = "none";td4.style.borderTop = "none";
                td5.innerHTML = JsonData["uploader"];td5.style.textAlign = "center";td5.style.border = "#cccccc solid 1px";td5.style.borderLeft = "none";td5.style.borderTop = "none";
                td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["id"] + "\")'>删除</a>";
                td6.style.textAlign = "center";td6.style.border = "#cccccc solid 1px";td6.style.borderLeft = "none";td6.style.borderTop = "none";
                tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);tr.appendChild(td6);
                t_table.appendChild(tr);
            }
        }

        let appave_title = document.querySelector("#appave-title");
        let examine_model = document.querySelector("#examine-model");

        appave_title.addEventListener("mousedown", function (e) {
            let x = e.pageX - examine_model.offsetLeft;
            let y = e.pageY - examine_model.offsetTop;
            document.addEventListener("mousemove", move);

            function move(e) {
                examine_model.style.left = e.pageX - x + 'px';
                examine_model.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        let stop_title = document.querySelector("#stop_title");
        let stop_module = document.querySelector("#stop_module");

        stop_title.addEventListener("mousedown", function (e) {
            let x = e.pageX - stop_module.offsetLeft;
            let y = e.pageY - stop_module.offsetTop;
            document.addEventListener("mousemove", move);

            function move(e) {
                stop_module.style.left = e.pageX - x + 'px';
                stop_module.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        function RemoveTr(_this, tbody_id, wj_id) {
            var table = document.getElementById(tbody_id);
            var trNode = $(_this).parent().parent();
            trNode.remove();

            for (var i = 0; i < table.children.length; i++) {
                table.children[i].children[0].innerHTML = i + 1;
            }

            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/delete_attachments_view", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id=" + String(wj_id));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert("删除成功！")
                    }
                }
            };
        }

        function page_zhanshi() {
            document.getElementById('page_one').style.display = 'inline-block';
        }

        function page_yincang() {
            document.getElementById('page_one').style.display = 'none';
        }

        function online_tag() {
            document.getElementById("appave-model").style.display = "table-row";
        }

        function close_models() {
            document.getElementById("appave-model").style.display = "none";
        }

        function summit_data(approve) {
            var present_id = window.location.href.split("id=")[1].replace("#", '');
            var audit_note = document.getElementById("opinion_detail").value;
            if (approve === "draft") {
                if (!audit_note) {
                    alert("不同意请填写理由！");
                    return false
                }
            }
            var note_str = "id=" + present_id + "&state=" + String(approve) + "&audit_note=" + String(audit_note)
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            xhr.open('post', "/finance/dimission_detail_view");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send(note_str);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("审批成功");
                            window.location.href = '/personal-center/process_management.html?type=我的待办&folw_type=人事审批&folw=离职申请&page=1&page_size=20&wd='
                        } else {
                            alert(JsonDate["message"]);
                        }
                    }
                }
            };
        }

        function ExportCar() {
            var hiredate = document.getElementById("test12").value;                   // 入职时间
            var dimission_time = document.getElementById('test13').value;                       // 离职时间
            var dimission_note = document.getElementById('dimission_note').value;       // 离职原因
            var people_type = $("input[type=radio][name=people_type]:checked").val();

            if (!dimission_note) {
                alert("离职原因不能为空！");
                return false
            }
            if (!hiredate) {
                alert('请选择入职时间！');
                return false
            }
            if (!dimission_time) {
                alert('请选择拟离职时间！');
                return false
            }
            if (!people_type) {
                alert('请选择人员类别！');
                return false
            }
            var str_word = "flow_id={{ obj.id }}&hiredate=" + hiredate + "&dimission_time=" + dimission_time + "&dimission_note=" + dimission_note + "&fj_number=" + String(uuid)+"&people_type="+String(people_type)

            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/finance/dimission_apply_write_view", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send(str_word);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert(JsonDate["message"])
                            window.location.href = "/finance/dimission_apply_list_view"
                        } else {
                            alert(JsonDate["message"])
                        }
                    }
                }
            };
        }

        function operate_button() {
            var r = confirm('是否终止流程？')
            if (r === true) {
                document.getElementById("stop_popup").style.display = "table-row";
            }
        }

        function close_stop_module() {
            document.getElementById("stop_popup").style.display = "none";
        }

        function discontinue_flow(flow_id) {
            var form = new FormData();
            var discontinue_reason = document.getElementById("discontinue_reason").value;
            if (!discontinue_reason) {
                alert("请输入中止理由！")
                return false
            }
            if (!file_entry.length) {
                alert("请上传附件！")
                return false
            }
            for (var i=0; i<file_entry.length; i++) {
                form.append("file"+String(i), file_entry[i]);
            }
            form.append("id", flow_id);
            form.append("discontinue_reason", discontinue_reason);
            form.append("state", 'stop');
            form.append("file_lenth", file_entry.length);
            form.append("fj_number", '{{ obj.fj_number }}');
            var xhr = new XMLHttpRequest();
            xhr.open('post', "/finance/dimission_apply_revoke_view", true);
            xhr.send(form)
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert(JsonDate['message'])
                        window.location.href = "/personal-center/process_management.html?type=我的待办&folw_type=人事审批&folw=离职申请&page=1&page_size=20&wd="
                    }
                }
            };
        }

        function print_topics() {
            $('#menu_from').jqprint({
                debug: false,
                importCSS: true,
                printContainer: true,
                operaSupport: false
            });
        }

        function onclick_upload_file() {
            document.getElementById("regular_main_body").click();
        }

        function upload_accessory1() {
            var files = document.getElementById("regular_main_body").files[0];
            file_entry.push(files)
            creat_table1(files.name)
        }

        function creat_table1(file_name) {
            var tag_lenth = document.getElementById("upload_file_list").children.length;
            var html_str = `
                <div style="width: 100%;height: 40px;line-height: 40px;">
                    <div style="width: 79%;height: 100%;display: inline-block;vertical-align: top;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                        <a target='_blank' href="javascript:;">`+file_name+`</a>
                    </div>
                    <div onclick="RemoveTr1(this, `+String(tag_lenth)+`)" style="width: 18%;height: 100%;display: inline-block;vertical-align: top;text-align: center;font-size: 12px;cursor: pointer;color: red;">
                        删除
                    </div>
                </div>
            `
            $("#upload_file_list").append(html_str)
        }

        function RemoveTr1(_this, seat_index) {
            file_entry.splice(seat_index, 1);
            var parentNode = _this.parentNode;
            parentNode.remove()
        }
    </script>
{% endblock %}
